using JGSY.CMS.LowCode.Platform.Application.DTOs;
using System.Threading.Tasks;

namespace JGSY.CMS.LowCode.Platform.Application.Interfaces
{
    /// <summary>
    /// 用户管理应用服务接口。
    /// 提供用户注册、登录、用户信息获取等用户管理相关业务功能接口定义。
    /// </summary>
    public interface IUserAppService
    {
        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="email">邮箱</param>
        /// <param name="password">密码</param>
        /// <param name="phone">手机号码（可选）</param>
        /// <returns>注册任务</returns>
        Task RegisterAsync(string username, string email, string password, string? phone = null);
        
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="password">密码</param>
        /// <returns>登录令牌</returns>
        Task<string> LoginAsync(string username, string password);
        
        /// <summary>
        /// 获取当前用户信息
        /// </summary>
        /// <returns>当前用户信息</returns>
        Task<UserDto?> GetCurrentUserAsync();
    }
}
